<?php
/*
	选择打印机接口，通过访问此页面获取打印机id
*/
defined('BY_JYA') or exit('error');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
$return=array();
if($_RQ['op']=='list'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$return['params']=$params=array();
	$params=array('uniacid'=>$_SESSION['uniacid']);
	//打印机名称
	if(!empty($_RQ['title'])){
		$params['title like']='%'.trim($_RQ['title']).'%';
		$return['title']=$_RQ['title'];
	}
	$parameter=array('params'=>$params,'fields'=>array('id','title','type','is_wechat'),'limit'=>array($pindex,$psize),'orderby'=>'id desc');
	$list=$this->get_list('print',$parameter,$total);
	$return['list']=$list;
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	//$return['htmls']=array();
	exi($return);
}
?>